Flask = Widget.extend({
	runningAction:null,
	ctor:function(){
		this._super();
		this.init();
		this.setTag(TAG_FLASK_ALL);
	},
	init:function(){
		//锥形瓶
		this.body = new Button(this, 10, TAG_FLASK, "#flask.png", this.callback,this);
		this.body.setAnchorPoint(cc.p(0.5, 0.8));
		
		var film=new Button(this.body,10,TAG_FILM1,"#beaker_line.png",this.callback,this);
		film.setPosition(cc.p(this.body.width*0.5, this.body.height*0.05));
		film.setOpacity(0);
		
		var Precipitation=new Button(this.body,10,TAG_PRECIPITATION,"#Precipitation.png",this.callback,this);
		Precipitation.setPosition(cc.p(this.body.width*0.5, this.body.height*0.05));
		Precipitation.setOpacity(0);
		
	},
	show:function(){
		var fadein=cc.fadeIn(0.1);
		var film=this.body.getChildByTag(TAG_FILM1);
		var scale=cc.scaleBy(1,0.8);
		var move=cc.moveBy(2.5,cc.p(0,this.body.height*0.35));
		film.runAction(cc.sequence(fadein,cc.spawn(scale,move)));
	},
	show1:function(){
		var film=this.body.getChildByTag(TAG_FILM1);
		var scale=cc.scaleBy(1,0.6);
		var move=cc.moveBy(1,cc.p(0,this.body.height*0.1));
		film.runAction(cc.spawn(scale,move));
	},
	show2:function(){
		var Precipitation=this.body.getChildByTag(TAG_PRECIPITATION);
		var fadein=cc.fadeIn(0.5);
		Precipitation.runAction(fadein);
	},
	callback:function(p){
		var func=cc.callFunc(function() {
			gg.flow.next();
		},this);
		switch (p.getTag()) {
		case TAG_FLASK:
			this.setLocalZOrder(12);
			var ber=cc.bezierBy(1, [cc.p(-50,15),cc.p(-235,30),cc.p(-535,-20)]);
			p.runAction(cc.sequence(ber,func));
			break;
		default:
			break;
		}
	}
});